<template>
  <q-page>
    <CertTemplate :cert-data='certData'/>
  </q-page>
</template>

<script lang='ts'>
import { defineComponent, onMounted, ref } from 'vue';
import CertTemplate from './components/CertTemplate.vue';
import { CertData } from './model/CertData';
import { getCertData } from './function/ServerData'
import { useRoute } from 'vue-router';

export default defineComponent( {
  name: 'Cert',
  components: { CertTemplate },
  setup () {
    let rote = useRoute();
    const uuid = <string> rote.query.uuid;
    let certData = ref<CertData>(null);

    onMounted(() => {
      getCertData(uuid,certData);
    })

    return {
      certData
    }

  }
});
</script>

<style scoped>

</style>
